# Maintainer: team/gnome <ablocorrea@hotmail.com>
pkgname=libshumate
pkgver=1.2.0
pkgrel=1
pkgdesc="GTK4 widget to display maps"
url="https://gitlab.gnome.org/GNOME/libshumate"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	gobject-introspection-dev
	gperf
	gtk4.0-dev
	json-glib-dev
	libsoup3-dev
	meson
	protobuf-c-dev
	vala
	"
checkdepends="dbus mesa-dri-gallium xvfb-run"
subpackages="$pkgname-dev $pkgname-lang"
source="https://gitlab.gnome.org/GNOME/libshumate/-/archive/$pkgver/libshumate-$pkgver.tar.gz
	236.patch
	"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dgtk_doc=false \
		-Dvector_renderer=true \
		. output
	meson compile -C output
}

check() {
	dbus-run-session \
		xvfb-run -a \
		meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
7a3ba38e9be05c806d8ba65f51bc739839b3845398b6bf73a8f841bb43652225b5053ba4bf66b0e7aa8edf48f8efc6867d6f5b6917bafae06868d6a68523f38e  libshumate-1.2.0.tar.gz
af67625ec244ece2486d12f3e09d123a3f6673b844882058dfe0d47bb443d019fe22686d1f1e7794c8e3d60e3eb98741d98631b310d1e72fd3787867297860d5  236.patch
"
